<!-- xml version="1.0" encoding="utf-8" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<title>De Bello Gallico</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="../flashcard.css" rel="stylesheet" type="text/css">
</head>


<script type="text/javascript">
var sentences = [
  [ ["Flumen", "est", "Arar,", "quod", "per", "fines", "Aeduorum", "et", "Sequanorum", "in", "Rhodanum", "influit,"],
    ["River", "is", "Arar,", "which", "through", "territories", "of-Aedui", "and", "of-Sequani", "into", "Rhone", "in-flows,"] ],
  [ ["incredibili", "lenitate,", "ita", "ut", "oculis,", "in", "utram", "partem", "fluat,", "iudicari", "non", "possit."],
    ["with-incredible", "smoothness,", "so", "that", "by-eyes,", "in", "which", "direction", "it-may-flow,", "to-be-judged", "not", "can."] ],
  [ ["Id", "Helvetii", "ratibus", "ac", "lintribus", "iunctis", "transibant."],
    ["That", "Helvetii", "by-rafts", "and", "boats", "joined", "over-were-going."] ],
  [ ["Vbi", "per", "exploratores", "Caesar", "certior", "factus", "est", "tres", "iam", "partes", "copiarum", "Helvetios", "id", "flumen", "traduxisse,"],
    ["When", "by-means-of", "scouts", "Caesar", "aware", "made", "was", "three", "now", "parts", "of-(the)-forces", "Helvetii", "this", "river", "over-to-have-led,"] ],
  [ ["quartam", "fere", "partem", "citra", "flumen", "Ararim", "reliquam", "esse,"],
    ["[a]-fourth", "about", "part", "this-side", "river", "Arar", "left", "to-be,"] ],
  [ ["de", "tertia", "vigilia", "cum", "legionibus", "tribus", "e", "castris", "profectus", "ad", "eam", "partem", "pervenit,"],
    ["at", "[the]-third", "watch", "with", "legions", "three", "from", "camp", "having-set-out", "to", "that", "part", "came-up,"] ],
  [ ["quae", "nondum", "flumen", "transierat."],
    ["which", "not-yet", "river", "had-crossed."] ],
  [ ["Eos", "impeditos", "et", "inopinantes", "adgressus", "magnam", "partem", "eorum", "concidit:"],
    ["Those", "encumbered", "and", "not-aware", "having-attacked", "great", "part", "of-those", "he-cut-to-pieces:"] ],
  [ ["reliqui", "sese", "fugae", "mandarunt", "atque", "in", "proximas", "silvas", "abdiderunt."],
    ["[the]-rest", "themselves", "to-flight", "gave-up", "and", "in", "nearest", "woods", "hid."] ],
  [ ["Is", "pagus", "appellabatur", "Tigurinus:", "nam", "omnis", "civitas", "Helvetia", "in", "quattuor", "pagos", "divisa", "est."],
    ["That", "canton", "was-called", "Tigurinus:", "for", "all", "[the]-state", "Helvetian", "into", "four", "cantons", "divided", "was."] ],
  [ ["Hic", "pagus", "unus,", "cum", "domo", "exisset,", "patrum", "nostrorum", "memoria,"],
    ["This", "canton", "alone,", "when", "from-home", "out-it-had-gone,", "of-fathers", "our", "in-memory,"] ],
  [ ["L.", "Cassium", "consulem", "interfecerat", "et", "eius", "exercitum", "sub", "iugum", "miserat."],
    ["Lucius", "Cassius", "consul", "had-killed", "and", "that-one’s", "army", "under", "the-yoke", "had-sent."] ],
  [ ["Ita", "sive", "casu", "sive", "consilio", "deorum", "immortalium,"],
    ["So", "either", "by-chance", "or", "by-design", "of-gods", "immortal,"] ],
  [ ["quae", "pars", "civitatis", "Helvetiae", "insignem", "calamitatem", "populo", "Romano", "intulerat,", "ea", "princeps", "poenas", "persolvit."],
    ["what", "part", "of-state", "Helvetian", "noted", "calamity", "people", "Roman-on", "had-brought,", "that", "first", "penalties", "to-the-uttermost-paid."] ],
  [ ["Qua", "in", "re", "Caesar", "non", "solum", "publicas", "sed", "etiam", "privatas", "iniurias", "ultus est,"],
    ["Which", "in", "affair", "Caesar", "not", "only", "public", "but", "also", "private", "wrongs", "avenged,"] ],
  [ ["quod", "eius", "soceri", "L.", "Pisonis", "avum,", "L.", "Pisonem", "legatum,", "Tigurini", "eodem", "proelio", "quo", "Cassium", "interfecerant."],
    ["since", "that-one’s", "father-in-law", "Lucius", "Piso’s", "grandfather,", "Lucius", "Piso", "lieutenant,", "Tigurini", "in-that-same", "battle", "in-which", "Cassius", "had-killed."] ]
];

var i = 0;
var j = 0;

var shown = 0;

function updateVoc() {
	
	var sentence = "";
	
	for(n = 0; n < sentences[i][0].length; n++) {
		if (n == j) {
			sentence += ' <span class="curword">' + sentences[i][0][n] + "</span>";
		} else {
			sentence += " " + sentences[i][0][n];
		}
	}
	
	document.getElementById('v3').innerHTML = sentence;
	
	if (shown == 0) {
		document.getElementById('v1').innerHTML = "";
	} else {
		document.getElementById('v1').innerHTML = sentences[i][1][j];
	}
}

function next() {
	shown++;
	if (shown > 1) {
		shown = 0;
		j++;
		if (j >= sentences[i][0].length) {
			j = 0;
			i++;
			if (i >= sentences.length) {
				i = 0;
				alert('All done!');
			}
		}
	}
	updateVoc();
}

function prev() {
	shown--;
	if (shown < 0) {
		shown = 1;
		j--;
		
		if (j < 0) {
			i--;
			if (i < 0) {
				i = sentences.length - 1;
				alert('All done!');
			}
			j = sentences[i][0].length - 1;
		}
	}
	
	updateVoc();
}

</script>

<body onload="updateVoc()">
<h1 style="text-align:center; color: #60B0C0;">Liber I - Caput XII</h1>

<div class="center">
<div id="v3" class="v3"></div>
<div id="v2" class="v2">&nbsp;</div>
<div id="v1" class="v1"></div>


<a href="#" class="button" id="btnprev" onclick="prev()" accesskey="p">&lt;&lt;</a>
<a href="#" class="button" id="btnnext" onclick="next()" accesskey="n">&gt;&gt;</a>


</div>
</body>
</html>
